<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>pyzy: /home/hsumita/pyzy/src/InputContext.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">pyzy
   &#160;<span id="projectnumber">0.0.8</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">/home/hsumita/pyzy/src/InputContext.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* vim:set et ts=4 sts=4:</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * libpyzy - The Chinese PinYin and Bopomofo conversion library.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Copyright (c) 2008-2010 Peng Huang &lt;shawn.p.huang@gmail.com&gt;</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * This library is free software; you can redistribute it and/or modify</span>
<a name="l00008"></a>00008 <span class="comment"> * it under the terms of the GNU Lesser General Public License as</span>
<a name="l00009"></a>00009 <span class="comment"> * published by the Free Software Foundation; either version 2.1 of the</span>
<a name="l00010"></a>00010 <span class="comment"> * License, or (at your option) any later version.</span>
<a name="l00011"></a>00011 <span class="comment"> *</span>
<a name="l00012"></a>00012 <span class="comment"> * This library is distributed in the hope that it will be useful, but</span>
<a name="l00013"></a>00013 <span class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00014"></a>00014 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00015"></a>00015 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00016"></a>00016 <span class="comment"> *</span>
<a name="l00017"></a>00017 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00018"></a>00018 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
<a name="l00019"></a>00019 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307</span>
<a name="l00020"></a>00020 <span class="comment"> * USA</span>
<a name="l00021"></a>00021 <span class="comment"> */</span>
<a name="l00034"></a>00034 <span class="preprocessor">#ifndef __PYZY_INPUT_CONTEXT_H_</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define __PYZY_INPUT_CONTEXT_H_</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00039"></a>00039 
<a name="l00040"></a><a class="code" href="namespacePyZy.html">00040</a> <span class="keyword">namespace </span>PyZy {
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 <span class="keyword">class </span><a class="code" href="classPyZy_1_1Variant.html" title="Variant class to handle various type of value.">Variant</a>;
<a name="l00043"></a>00043 
<a name="l00047"></a><a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852a">00047</a> <span class="keyword">enum</span> <a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852a" title="An enum to represent a candidate type.">CandidateType</a> {
<a name="l00049"></a><a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852aad640459d46bebca4386e39068f4b4312">00049</a>     <a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852aad640459d46bebca4386e39068f4b4312">NORMAL_PHRASE</a>,
<a name="l00051"></a><a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852aa10efcd90fed780e1543ba6e20a37869d">00051</a>     <a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852aa10efcd90fed780e1543ba6e20a37869d">USER_PHRASE</a>,
<a name="l00053"></a><a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852aabadeae4b5cde1f53da3c40a98bef9923">00053</a>     <a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852aabadeae4b5cde1f53da3c40a98bef9923">SPECIAL_PHRASE</a>,
<a name="l00054"></a>00054 };
<a name="l00055"></a>00055 
<a name="l00059"></a><a class="code" href="structPyZy_1_1Candidate.html">00059</a> <span class="keyword">struct </span><a class="code" href="structPyZy_1_1Candidate.html" title="Contains a candidate data.">Candidate</a> {
<a name="l00061"></a><a class="code" href="structPyZy_1_1Candidate.html#ace2643d0116bd20b0d82a22ff12ea139">00061</a>     std::string <a class="code" href="structPyZy_1_1Candidate.html#ace2643d0116bd20b0d82a22ff12ea139">text</a>;
<a name="l00063"></a><a class="code" href="structPyZy_1_1Candidate.html#a1b1c17971106dea34c02d3ccf2e64a3a">00063</a>     <a class="code" href="namespacePyZy.html#a0c4a12670dfb7a455ba9f8a3a732852a" title="An enum to represent a candidate type.">CandidateType</a> <a class="code" href="structPyZy_1_1Candidate.html#a1b1c17971106dea34c02d3ccf2e64a3a">type</a>;
<a name="l00064"></a>00064 };
<a name="l00065"></a>00065 
<a name="l00074"></a><a class="code" href="classPyZy_1_1InputContext.html">00074</a> <span class="keyword">class </span><a class="code" href="classPyZy_1_1InputContext.html" title="Pinyin / Bopomofo conversion class.">InputContext</a> {
<a name="l00075"></a>00075 <span class="keyword">public</span>:
<a name="l00079"></a><a class="code" href="classPyZy_1_1InputContext.html#a2990105772e54835248fabdd3ea40e44">00079</a>     <span class="keyword">virtual</span> <a class="code" href="classPyZy_1_1InputContext.html#a2990105772e54835248fabdd3ea40e44" title="Virtual destructor.">~InputContext</a> (<span class="keywordtype">void</span>) { }
<a name="l00080"></a>00080 
<a name="l00088"></a><a class="code" href="classPyZy_1_1InputContext_1_1Observer.html">00088</a>     <span class="keyword">class </span><a class="code" href="classPyZy_1_1InputContext_1_1Observer.html" title="Observer class of the InputContext.">Observer</a> {
<a name="l00089"></a>00089     <span class="keyword">public</span>:
<a name="l00090"></a>00090         <span class="keyword">virtual</span> ~<a class="code" href="classPyZy_1_1InputContext_1_1Observer.html" title="Observer class of the InputContext.">Observer</a> () { }
<a name="l00091"></a>00091 
<a name="l00092"></a>00092 
<a name="l00101"></a>00101         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext_1_1Observer.html#a522e5f1ff9f4b1175b0f3c858b2b2711" title="Notifies a commit text.">commitText</a> (<a class="code" href="classPyZy_1_1InputContext.html" title="Pinyin / Bopomofo conversion class.">InputContext</a> * context,
<a name="l00102"></a>00102                                  <span class="keyword">const</span> std::string &amp;commit_text) = 0;
<a name="l00103"></a>00103 
<a name="l00111"></a>00111         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext_1_1Observer.html#a878761237316a954d67c91e7ae989066" title="Notifies input text is changed.">inputTextChanged</a> (<a class="code" href="classPyZy_1_1InputContext.html" title="Pinyin / Bopomofo conversion class.">InputContext</a> * context) = 0;
<a name="l00112"></a>00112 
<a name="l00119"></a>00119         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext_1_1Observer.html#ab414e644cbe27776d5b07f8af205fcbc" title="Notifies cursor is changed.">cursorChanged</a> (<a class="code" href="classPyZy_1_1InputContext.html" title="Pinyin / Bopomofo conversion class.">InputContext</a> * context) = 0;
<a name="l00120"></a>00120 
<a name="l00128"></a>00128         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext_1_1Observer.html#abddbbbf9e8a7cbc5e4c6ee0a44ec2b81" title="Notifies preedit text is changed.">preeditTextChanged</a> (<a class="code" href="classPyZy_1_1InputContext.html" title="Pinyin / Bopomofo conversion class.">InputContext</a> * context) = 0;
<a name="l00129"></a>00129 
<a name="l00137"></a>00137         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext_1_1Observer.html#a64be531d083aa77077ea32e3c886fdf8" title="Notifies auxiliary text is changed.">auxiliaryTextChanged</a> (<a class="code" href="classPyZy_1_1InputContext.html" title="Pinyin / Bopomofo conversion class.">InputContext</a> * context) = 0;
<a name="l00138"></a>00138 
<a name="l00146"></a>00146         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext_1_1Observer.html#afd5b1b00a46d29f9f62b7d82d7bb4112" title="Notifies candidates are changed.">candidatesChanged</a> (<a class="code" href="classPyZy_1_1InputContext.html" title="Pinyin / Bopomofo conversion class.">InputContext</a> * context) = 0;
<a name="l00147"></a>00147     };
<a name="l00148"></a>00148 
<a name="l00152"></a><a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391">00152</a>     <span class="keyword">enum</span> <a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391" title="Input text type.">InputType</a> {
<a name="l00154"></a><a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391a02c67803c5a4c70704cd2be4bbdf9d62">00154</a>         <a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391a02c67803c5a4c70704cd2be4bbdf9d62">FULL_PINYIN</a>,
<a name="l00156"></a><a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391aa63e8ac07674065793a2540fb6f5c1ed">00156</a>         <a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391aa63e8ac07674065793a2540fb6f5c1ed">DOUBLE_PINYIN</a>,
<a name="l00158"></a><a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391a088cf337cef705488d837015545e8d63">00158</a>         <a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391a088cf337cef705488d837015545e8d63">BOPOMOFO</a>,
<a name="l00159"></a>00159     };
<a name="l00160"></a>00160 
<a name="l00164"></a><a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fd">00164</a>     <span class="keyword">enum</span> <a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fd" title="Commit type.">CommitType</a> {
<a name="l00166"></a><a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fdabd4482061fff6951987d4df1b8343a0f">00166</a>         <a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fdabd4482061fff6951987d4df1b8343a0f">TYPE_RAW</a>,
<a name="l00168"></a><a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fdad340eeeb0354a4b9a13ac5124a1123bd">00168</a>         <a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fdad340eeeb0354a4b9a13ac5124a1123bd">TYPE_PHONETIC</a>,
<a name="l00170"></a><a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fda045eea76f069cf5fbf0a7798ad7d42e2">00170</a>         <a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fda045eea76f069cf5fbf0a7798ad7d42e2">TYPE_CONVERTED</a>,
<a name="l00171"></a>00171     };
<a name="l00172"></a>00172 
<a name="l00176"></a><a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caac">00176</a>     <span class="keyword">enum</span> <a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caac" title="PropertyName.">PropertyName</a> {
<a name="l00184"></a><a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caaca42b7ebe31732339c5dd116906b3fcf93">00184</a>         <a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caaca42b7ebe31732339c5dd116906b3fcf93">PROPERTY_CONVERSION_OPTION</a>,
<a name="l00191"></a><a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caaca9d6dc59beb9c59372939cb3e938b9671">00191</a>         <a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caaca9d6dc59beb9c59372939cb3e938b9671" title="Double pinyin schema.">PROPERTY_DOUBLE_PINYIN_SCHEMA</a>,
<a name="l00198"></a><a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caaca451317deb22e42e423044dbcad757bbc">00198</a>         <a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caaca451317deb22e42e423044dbcad757bbc" title="Bopomofo schema.">PROPERTY_BOPOMOFO_SCHEMA</a>,
<a name="l00203"></a><a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caacacccb5d34e3e731a01480a7e68abeb14d">00203</a>         <a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caacacccb5d34e3e731a01480a7e68abeb14d" title="Uses special phrase. Default value is true.">PROPERTY_SPECIAL_PHRASE</a>,
<a name="l00208"></a><a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caaca12c8263f704b97e925bdd195be86ede7">00208</a>         <a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caaca12c8263f704b97e925bdd195be86ede7" title="Uses simplified chinese character. Default value is true.">PROPERTY_MODE_SIMP</a>,
<a name="l00209"></a>00209     };
<a name="l00210"></a>00210 
<a name="l00219"></a>00219     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a0e1372a05cda00e57bb1ef49917ee025" title="Appends a new character on cursor position.">insert</a> (<span class="keywordtype">char</span> ch) = 0;
<a name="l00220"></a>00220 
<a name="l00229"></a>00229     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext.html#a93416c6aae249128df880905ff494b89" title="Fixes the conversion result.">commit</a> (<a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fd" title="Commit type.">CommitType</a> type = <a class="code" href="classPyZy_1_1InputContext.html#afe8f3dd629c2b63fddc35bd7a856d8fda045eea76f069cf5fbf0a7798ad7d42e2">TYPE_CONVERTED</a>) = 0;
<a name="l00230"></a>00230 
<a name="l00234"></a>00234     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext.html#a022b802582b852dbe7e8cdb78ce8b88d" title="Resets the context.">reset</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00235"></a>00235 
<a name="l00240"></a>00240     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#ab54c155a3882c06d43e8b5af9c3ba621" title="Moves a cursor to right input character.">moveCursorRight</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00241"></a>00241 
<a name="l00246"></a>00246     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#acc0870f955681b62643c5230ea858f30" title="Moves a cursor to left input character.">moveCursorLeft</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00247"></a>00247 
<a name="l00256"></a>00256     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a2ddda01e66b285003a32a8e23ad67fab" title="Moves a cursor to left chinese character.">moveCursorRightByWord</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00257"></a>00257 
<a name="l00262"></a>00262     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a5247e3372f032111b74dc019d2104633" title="Moves a cursor to right chinese character.">moveCursorLeftByWord</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00263"></a>00263 
<a name="l00268"></a>00268     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#afcee93c2a849c34bc952d415bd6f3331" title="Moves a cursor to the beginning of the the input text.">moveCursorToBegin</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00269"></a>00269 
<a name="l00274"></a>00274     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a6c24051ecdc57b70041aa03874ba2743" title="Removes a input character before a cursor.">removeCharBefore</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00275"></a>00275 
<a name="l00280"></a>00280     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#ad529e511ce07cbeddf965024c6674abc" title="Removes a input character after a cursor.">removeCharAfter</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00281"></a>00281 
<a name="l00286"></a>00286     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#ab7068d4370683edceb0c66d1798d3031" title="Removes a chinese character before a cursor.">removeWordBefore</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00287"></a>00287 
<a name="l00295"></a>00295     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#acb2e53866d7efa7647b6079fcd5c8173" title="Removes a chinese character after a cursor.">removeWordAfter</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00296"></a>00296 
<a name="l00301"></a>00301     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a1b494f084949ab2e0a9432e9f6f8c4c3" title="Moves a cursor to the end of the the input text.">moveCursorToEnd</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00302"></a>00302 
<a name="l00311"></a>00311     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a2a75b69c18b058a55827112f487e63ff" title="Selects a candidate and converts a rest text.">selectCandidate</a> (<span class="keywordtype">size_t</span> index) = 0;
<a name="l00312"></a>00312 
<a name="l00318"></a>00318     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a4da12a2b558648c7d2d432409ee4d87d" title="Focuses a candidate.">focusCandidate</a> (<span class="keywordtype">size_t</span> index) = 0;
<a name="l00319"></a>00319 
<a name="l00324"></a>00324     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a0e18ae9a2555d5291bdd26e99c273542" title="Focuses a previous candidate.">focusCandidatePrevious</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00325"></a>00325 
<a name="l00331"></a>00331     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a4da32a86ce6211d1652df9399ab33cc0" title="Focuses a next candidate.">focusCandidateNext</a> (<span class="keywordtype">void</span>) = 0;
<a name="l00332"></a>00332 
<a name="l00338"></a>00338     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a34ea0475b62ab1e842e439438e80f9d6" title="Resets a user input history of the candidate.">resetCandidate</a> (<span class="keywordtype">size_t</span> index) = 0;
<a name="l00339"></a>00339 
<a name="l00344"></a>00344     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#abd377f4842161af3c6609e3190ad18cd" title="Unselects a selected text.">unselectCandidates</a> () = 0;
<a name="l00345"></a>00345 
<a name="l00355"></a>00355     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a25a0c9ac7175ee2a713e990312e7f43b" title="Checks the candidate is exist or not.">hasCandidate</a> (<span class="keywordtype">size_t</span> index) = 0;
<a name="l00356"></a>00356 
<a name="l00367"></a>00367     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#abd7aa51d9cea243fe8c9a38daf4b1437" title="Gets the candidate if exists.">getCandidate</a> (<span class="keywordtype">size_t</span> index, <a class="code" href="structPyZy_1_1Candidate.html" title="Contains a candidate data.">Candidate</a> &amp; output) = 0;
<a name="l00368"></a>00368 
<a name="l00376"></a>00376     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="classPyZy_1_1InputContext.html#a87ee52e0b1562993c2aeee8bca6c2cb2" title="Gets a already prepared candidates size.">getPreparedCandidatesSize</a> () <span class="keyword">const</span> = 0;
<a name="l00377"></a>00377 
<a name="l00385"></a>00385     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext.html#a78cce1032342f094be615ec0dd3851cf" title="Initializes a InputContext class.">init</a> ();
<a name="l00386"></a>00386 
<a name="l00399"></a>00399     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext.html#a78cce1032342f094be615ec0dd3851cf" title="Initializes a InputContext class.">init</a> (<span class="keyword">const</span> std::string &amp; user_cache_dir,
<a name="l00400"></a>00400                       <span class="keyword">const</span> std::string &amp; user_config_dir);
<a name="l00401"></a>00401 
<a name="l00407"></a>00407     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPyZy_1_1InputContext.html#ac197a8cd66bc0b85dd42339f5b283e08" title="Finalizes a InputContext class.">finalize</a> ();
<a name="l00408"></a>00408 
<a name="l00418"></a>00418     <span class="keyword">static</span> <a class="code" href="classPyZy_1_1InputContext.html" title="Pinyin / Bopomofo conversion class.">InputContext</a> * <a class="code" href="classPyZy_1_1InputContext.html#adf0f3aea2c16b5cf5838edec46444e27" title="Creates a new InputContext instance.">create</a> (<a class="code" href="classPyZy_1_1InputContext.html#aa34679a81ae706ccf452c6d6800b0391" title="Input text type.">InputContext::InputType</a> type,
<a name="l00419"></a>00419                                   <a class="code" href="classPyZy_1_1InputContext_1_1Observer.html" title="Observer class of the InputContext.">InputContext::Observer</a> * observer);
<a name="l00420"></a>00420 
<a name="l00425"></a>00425     <span class="keyword">virtual</span> <span class="keyword">const</span> std::string &amp; <a class="code" href="classPyZy_1_1InputContext.html#a53f0ab06a72d8cd20d3d569b68b245b1" title="Returns a input text.">inputText</a> () <span class="keyword">const</span> = 0;
<a name="l00426"></a>00426 
<a name="l00431"></a>00431     <span class="keyword">virtual</span> <span class="keyword">const</span> std::string &amp; <a class="code" href="classPyZy_1_1InputContext.html#a0dfbb78246279dda7eb7daee352c8f02" title="Returns a selected text.">selectedText</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0;
<a name="l00432"></a>00432 
<a name="l00437"></a>00437     <span class="keyword">virtual</span> <span class="keyword">const</span> std::string &amp; <a class="code" href="classPyZy_1_1InputContext.html#ac61f0c1076dc3b2a1202289ff0befba2" title="Returns a conversion text.">conversionText</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0;
<a name="l00438"></a>00438 
<a name="l00443"></a>00443     <span class="keyword">virtual</span> <span class="keyword">const</span> std::string &amp; <a class="code" href="classPyZy_1_1InputContext.html#a49c8f23fece3e917c269649709d6d0f4" title="Returns a rest text.">restText</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0;
<a name="l00444"></a>00444 
<a name="l00449"></a>00449     <span class="keyword">virtual</span> <span class="keyword">const</span> std::string &amp; <a class="code" href="classPyZy_1_1InputContext.html#a9d9f0504cd1c7daa3fb6d43512a8c20e" title="Returns a auxiliary text.">auxiliaryText</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0;
<a name="l00450"></a>00450 
<a name="l00455"></a>00455     <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classPyZy_1_1InputContext.html#af44fc8c5c4a2102c9a19ba9dd3df753b" title="Returns a cursor position from the beginning of the input text.">cursor</a> () <span class="keyword">const</span> = 0;
<a name="l00456"></a>00456 
<a name="l00461"></a>00461     <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classPyZy_1_1InputContext.html#ae44fe2833bf415db4d1a74e0269e1ee4" title="Returns a index of the focused candidate.">focusedCandidate</a> () <span class="keyword">const</span> = 0;
<a name="l00462"></a>00462 
<a name="l00468"></a>00468     <span class="keyword">virtual</span> <a class="code" href="classPyZy_1_1Variant.html" title="Variant class to handle various type of value.">Variant</a> <a class="code" href="classPyZy_1_1InputContext.html#a83fb1e45f11d6dcc1823d9fe36918770" title="Gets property of the context.">getProperty</a> (<a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caac" title="PropertyName.">PropertyName</a> name) <span class="keyword">const</span> = 0;
<a name="l00469"></a>00469 
<a name="l00476"></a>00476     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPyZy_1_1InputContext.html#a44e51396b86c6f266ee328b893146f51" title="Sets property of the context.">setProperty</a> (<a class="code" href="classPyZy_1_1InputContext.html#ad3f63e1ce4c49fe4e2fc11254bd4caac" title="PropertyName.">PropertyName</a> name, <span class="keyword">const</span> <a class="code" href="classPyZy_1_1Variant.html" title="Variant class to handle various type of value.">Variant</a> &amp;variant)= 0;
<a name="l00477"></a>00477 };
<a name="l00478"></a>00478 
<a name="l00479"></a>00479 }; <span class="comment">// namespace PyZy</span>
<a name="l00480"></a>00480 
<a name="l00481"></a>00481 <span class="preprocessor">#endif  // __PYZY_INPUT_CONTEXT_H_</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Aug 1 2012 16:45:23 for pyzy by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
